﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>会员统计</title>
    <script src="../../Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <link href="../../Content/Themes/blue2/css.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
         .show_content{ margin:0px auto; width:900px;}
         .show_tp{  margin-bottom:10px;}
         .labelMargin{ display:inline-block; margin-left:20px;}
    </style>
</head>
<body class="main">
     <div class="AllWebTopDiv">
        <div class="path">
            <div class="nav">
                <a href="#">会员统计</a>
            </div>
        </div>
        <div class="content">
          <div class="show_content">
           <div class="show_tp" id="show_tp">
             <label class="labelMargin">性别：</label><select id="sex"><option value="0">全部</option><option value="1">男</option><option value="2">女</option></select>
             <label class="labelMargin">会员等级：</label><%:Html.DropDownList("memberLevel") %>
             <label class="labelMargin">籍贯：</label><%:Html.DropDownList("area") %>
             <input  type="button" value="搜索" onclick="searchData()" class="button2"  style="margin-left:100px;"/>
             <input  type="button" value="搜索全部" onclick="searchAllData()" class="button2"  style="margin-left:20px;"/>
             <input  type="button" id="exit" value="关闭" onclick="closeWindows();" class="button2" style="margin-left:20px;"/>
           </div>
            <div >
              <img id="chart" src="<%:Url.Action("LoadPie","MembercartTypeChart") %>" alt="未找到数据"/>
            </div>
        </div>
    
    </div>
   </div>
</body>
</html>
<script type="text/javascript">


    //搜索
    function searchData() {
        var sex = $("#sex").val();
        var memberLevel = $("#memberLevel").val();
        var area=$("#area").val(); 
        $("#chart").attr("src", "/MembercartTypeChart/LoadPie?sex="+sex+"&memberLevel="+memberLevel+"&area="+area+"");
     
    }

    function searchAllData() {
        $("#chart").attr("src", "/MembercartTypeChart/LoadPie");
    }
    //关闭窗口
    function closeWindows() {
        window.location.href = "/Loading/Index/?src=/Desktop/Index/";
    }
</script>
